import Vue from 'vue'
import App from './App.vue'
// 三级联动组件，全局注册
import TypeNav from './components/TypeNav/typeNav.vue'
// 分页器
import Pagination from '@/components/Pagination/pagination.vue'
// 引入路由
import router from './router/router.js'
// 引入仓库
import store from './store'
// 引入mockServe.js
import '@/mock/mockServe.js'
// 引入swiper的css包
import 'swiper/css/swiper.css'
import 'swiper/js/swiper.js'

Vue.config.productionTip = false

// 全局注册
Vue.component(TypeNav.name,TypeNav)
Vue.component(Pagination.name,Pagination)

new Vue({
  render: h => h(App),
  // 全局事件总线$bus配置
  beforeCreate(){
    Vue.prototype.$bus = this
  },
  // 注册路由信息
  router,
  // 注册仓库。则组件实例会多一个属性$store
  store
}).$mount('#app')
